﻿using System;

namespace Gp.Scripts.Core
{
    public enum UnitOutlineMode
    {
        Normal              = 1,
        Interactable        = 2,
        /// <summary>
        /// 念合
        /// </summary>
        Interfuse           = 3,
    }

    public static class UnitOutlineRendererFactory
    {
        public static UnitOutlineState GetOutlineModeRenderer(this UnitOutlineMode outlineMode)
        {
            // todo: 使用对象池
            return outlineMode switch
            {
                UnitOutlineMode.Normal => new NormalOutlineState(),
                UnitOutlineMode.Interactable => new NormalOutlineState(),
                UnitOutlineMode.Interfuse => new InterfuseOutlineState(),
                _ => throw new ArgumentOutOfRangeException(nameof(outlineMode), outlineMode, null)
            };
        }
    }
}